home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
comm1
/
dnload30.zip
/
DNZIPPRO.WAS
< prev
next >
Wrap
Text File
|
1993-04-18
|
2KB
|
98 lines
;ZipPro Version 1.2***********************************;
string prowin_path,unzip_these,filepath,filespec,zipath,unzip_path
string zip_to
proc main
integer status
prowin_path=$PWTASKPATH
strfmt S9 "%s\dnload.ini" Prowin_path ;format path for dnload.ini
profilerd S9 "PATH" "storage" unzip_path ;get storage dir
strfmt unzip_these "%s\unzip.txt" unzip_path ;format path for unzip.txt
profilerd S9 "PATH" "dn_zippath" filepath
strfmt filespec "%s\*.zip" filepath
dialogbox 102 30 180 151 2 "ZipPro V.2.0"
dirlistbox 32 16 109 98 filespec multiple unzip_these
pushbutton 8 124 76 14 " UN&ZIP Selected Files" normal
pushbutton 96 124 76 15 "&CANCEL" cancel
dirpath 52 8 69 10
text 31 8 20 8 left "Path:"
enddialog
status=$DIALOG
while status!=10 || status!=1
if status==10
call get_file
;exitwhile
endif
if status==1
exit
endif
STATUS=$DIALOG
ENDWHILE
endproc
proc get_file
fopen 0 unzip_these READ TEXT
if not success
usermsg "could not open unzip.txt"
endif
while not feof 0
fgets 0 S0
if not strfind S0 ".ZIP"
pause 2
loopwhile
endif
strcmp S0 $nullstr
if success
exitwhile
else
call md_fzip
call Zip_process
endif
endwhile
fclose 0
exit
endproc
proc md_fzip
integer index
profilerd S9 "PATH" "zip_to" zip_to
strcpy S1 S0
strupr S1
strreplace S1 ".ZIP" ""
strcpy S4 S1
loop:
if strfind S4 "\" index
index++
strdelete S4 0 index
goto loop
endif
strfmt S2 "%s\%s" zip_to S4
mkdir S2
endproc
proc zip_process
profilerd S9 "PATH" "zippath" zipath
;chdir "c:\PROWIN\DNLOAD"
strfmt S3 "%s\pkunzip %s %s\%s" zipath S0 zip_to S4
dos S3 hidden i0
if not success
usermsg "could not unzip"
endif
while istask i0
endwhile
endproc
;proc minus_path
;integer index
; strcpy S4 S0
;loop:
; if strfind S4 "\" index
; index++
; strdelete S4 0 index
; goto loop
; endif
;endproc